﻿<%@ Page Title="Contact" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="~/Unit2-Session3.aspx.cs" Inherits="Unit2_Session3" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <div>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="ID">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="HotelUrl" DataNavigateUrlFormatString="{0}" DataTextField="HotelName" HeaderText="Hotel Name" />
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                    <ControlStyle CssClass="hotel-image" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="Unit2-Session3-Detail.aspx?ID={0}" DataTextField="ID" DataTextFormatString="More Details" HeaderText="Hotel Details" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HotelsConnectionString %>" ProviderName="<%$ ConnectionStrings:HotelsConnectionString.ProviderName %>" SelectCommand="SELECT [HotelName], [HotelUrl], [Picture], [HotelDescription], [ID] FROM [Hotels]"></asp:SqlDataSource>
    </div>
</asp:Content>